Conversation
|
I confirmed with @mhegazy that if not provided it defaults to 0, so it should not make much difference. This is different from excluding node_modules. That stops the compiler from its normal, non-import search for source files, which sounds like exactly what we want here. |
|
@sandersn Thanks for the info! |
|
Is there anyway to exclude Tried: No effect, still breaks on https://github.com/mrgodhani/rss-reader per #131 (comment). OK, just figured out this works: This seems to match everything under |
|
I don't actually know the glob code. @rbuckton, can you comment whether the above Here are the PRs in case you want to look through the code yourself: |
Exclude node_modules in module resolution
/cc @sandersn
For #131 and alike, this seems to happen when a project is large.
In one of my project I was able to repro it, and while debugging I found:
https://github.com/octref/vetur/blob/master/server/src/modes/javascriptMode.ts#L50-L67
Then later in here:
https://github.com/octref/vetur/blob/master/server/src/modes/javascriptMode.ts#L89-L109
This function is called for each files. So for the whole worksapce it's called 6k times, one time for each js/ts/vue file, and then for each file TS was resolving all modules in them...
I don't know if this PR is the right approach, but it seems to solve the problem.
@sandersn
Meanwhile in #136 (comment) you said
Do you mean
maxNodeModuleJsDepth? That might help solving this issue, but how is the depth calculated?